<?php
require "./admin/config/mysql.php";
class register extends mysqlPdo
{
   public static function ifexit($username)

   { 
   	 $pdo = parent::getPdoConnect();
   	 $pdo -> setAttribute(PDO::ATTR_CASE, PDO::CASE_NATURAL);
	   $rs = $pdo -> query("select * from user where username = '$username'"); 
	   $rs -> setFetchMode(PDO::FETCH_ASSOC);
     return $rs;

   }


   public static function adduser($username,$phone,$email,$password,$sex,$regtime)

   {
     $pdo = parent::getPdoConnect();
     $rs = $pdo -> query("insert into user(username,phone,email,password,sex,regtime) value ('$username','$phone','$email','$password','$sex','$regtime')"); 
     return $rs;

   }


}


 ?>
